package com.ftrend.printdemo.mhttemplate;

import java.util.ArrayList;
import java.util.List;

public class TableElement {
    public static class Column {
        private final String label;
        private final int ratio;
        private final Style.Align align;

        private String summary;

        public Column(String label, int ratio, Style.Align align) {
            this.label = label;
            this.ratio = ratio;
            this.align = align;
        }

        public String getLabel() {
            return label;
        }

        public int getRatio() {
            return ratio;
        }

        public Style.Align getAlign() {
            return align;
        }

        public String getSummary() {
            return summary;
        }

        public void setSummary(String summary) {
            this.summary = summary;
        }
    }

    private final Column[] columns;
    private final List<String[]> rows = new ArrayList<>();

    public TableElement(Column[] columns) {
        this.columns = columns;
    }

    public void addRow(String[] row) {
        rows.add(row);
    }

    public Column[] getColumns() {
        return columns;
    }

    public List<String[]> getRows() {
        return rows;
    }
}
